package com.huluobo.day11_im.splash.presenter;

import com.hyphenate.chat.EMClient;

public class SplashPresenter implements SplashContract.Presenter {
    private SplashContract.View view;

    public SplashPresenter(SplashContract.View view) {
        this.view = view;
    }

    @Override
    public void checkIsLoggedInBefore() {
        if (isLoggedIn()) {
            view.isLoggedIn();
        } else {
            view.isNotLoggedIn();
        }
    }

    private boolean isLoggedIn() {
        return EMClient.getInstance().isLoggedInBefore();
    }
}
